﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

#nullable disable

namespace jiuyuan.Migrations
{
    /// <inheritdoc />
    public partial class init : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "副本配置表",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    等级要求 = table.Column<int>(type: "integer", nullable: false),
                    推荐人数 = table.Column<int>(type: "integer", nullable: false),
                    经验奖励 = table.Column<int>(type: "integer", nullable: false),
                    名称 = table.Column<string>(type: "text", nullable: false),
                    描述 = table.Column<string>(type: "text", nullable: false),
                    图标 = table.Column<string>(type: "text", nullable: false),
                    创建时间 = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    更新时间 = table.Column<DateTime>(type: "timestamp without time zone", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_副本配置表", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "用户表",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    用户名 = table.Column<string>(type: "text", nullable: false),
                    密码哈希 = table.Column<string>(type: "text", nullable: false),
                    邮箱 = table.Column<string>(type: "text", nullable: false),
                    是管理员 = table.Column<bool>(type: "boolean", nullable: false),
                    创建时间 = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    最后登录时间 = table.Column<DateTime>(type: "timestamp without time zone", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_用户表", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "战斗单位",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    头像 = table.Column<string>(type: "text", nullable: false),
                    单位类型 = table.Column<int>(type: "integer", nullable: false),
                    当前生命值 = table.Column<int>(type: "integer", nullable: false),
                    当前魔法值 = table.Column<int>(type: "integer", nullable: false),
                    Discriminator = table.Column<string>(type: "character varying(5)", maxLength: 5, nullable: false),
                    等级 = table.Column<int>(type: "integer", nullable: true),
                    怪物职业 = table.Column<string>(type: "text", nullable: true),
                    AI行为类型 = table.Column<string>(type: "text", nullable: true),
                    基础属性_生命值 = table.Column<int>(type: "integer", nullable: true),
                    基础属性_魔法值 = table.Column<int>(type: "integer", nullable: true),
                    基础属性_物理攻击 = table.Column<int>(type: "integer", nullable: true),
                    基础属性_物理防御 = table.Column<int>(type: "integer", nullable: true),
                    基础属性_火属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    基础属性_水属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    基础属性_风属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    基础属性_土属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    基础属性_火属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    基础属性_水属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    基础属性_风属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    基础属性_土属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    基础属性_速度 = table.Column<int>(type: "integer", nullable: true),
                    基础属性_幸运值 = table.Column<int>(type: "integer", nullable: true),
                    当前属性_生命值 = table.Column<int>(type: "integer", nullable: true),
                    当前属性_魔法值 = table.Column<int>(type: "integer", nullable: true),
                    当前属性_物理攻击 = table.Column<int>(type: "integer", nullable: true),
                    当前属性_物理防御 = table.Column<int>(type: "integer", nullable: true),
                    当前属性_火属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    当前属性_水属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    当前属性_风属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    当前属性_土属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    当前属性_火属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    当前属性_水属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    当前属性_风属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    当前属性_土属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    当前属性_速度 = table.Column<int>(type: "integer", nullable: true),
                    当前属性_幸运值 = table.Column<int>(type: "integer", nullable: true),
                    玩家_等级 = table.Column<int>(type: "integer", nullable: true),
                    经验值 = table.Column<int>(type: "integer", nullable: true),
                    是否自动战斗 = table.Column<bool>(type: "boolean", nullable: true),
                    名称 = table.Column<string>(type: "text", nullable: false),
                    描述 = table.Column<string>(type: "text", nullable: false),
                    图标 = table.Column<string>(type: "text", nullable: false),
                    创建时间 = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    更新时间 = table.Column<DateTime>(type: "timestamp without time zone", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_战斗单位", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "装备特效",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    特效名称 = table.Column<string>(type: "text", nullable: false),
                    特效描述 = table.Column<string>(type: "text", nullable: false),
                    特效类型 = table.Column<string>(type: "character varying(8)", maxLength: 8, nullable: false),
                    加成属性_生命值 = table.Column<int>(type: "integer", nullable: true),
                    加成属性_魔法值 = table.Column<int>(type: "integer", nullable: true),
                    加成属性_物理攻击 = table.Column<int>(type: "integer", nullable: true),
                    加成属性_物理防御 = table.Column<int>(type: "integer", nullable: true),
                    加成属性_火属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    加成属性_水属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    加成属性_风属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    加成属性_土属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    加成属性_火属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    加成属性_水属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    加成属性_风属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    加成属性_土属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    加成属性_速度 = table.Column<int>(type: "integer", nullable: true),
                    加成属性_幸运值 = table.Column<int>(type: "integer", nullable: true),
                    技能名称 = table.Column<string>(type: "text", nullable: true),
                    伤害加成 = table.Column<float>(type: "real", nullable: true),
                    额外效果回合 = table.Column<int>(type: "integer", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_装备特效", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "事件节点",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    副本配置Id = table.Column<Guid>(type: "uuid", nullable: false),
                    名称 = table.Column<string>(type: "text", nullable: false),
                    描述 = table.Column<string>(type: "text", nullable: false),
                    顺序 = table.Column<int>(type: "integer", nullable: false),
                    类型 = table.Column<string>(type: "text", nullable: false),
                    剧情内容 = table.Column<string>(type: "text", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_事件节点", x => x.Id);
                    table.ForeignKey(
                        name: "FK_事件节点_副本配置表_副本配置Id",
                        column: x => x.副本配置Id,
                        principalTable: "副本配置表",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "技能配置表",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    目标类型 = table.Column<int>(type: "integer", nullable: false),
                    效果类型 = table.Column<int>(type: "integer", nullable: false),
                    元素类型 = table.Column<int>(type: "integer", nullable: false),
                    消耗魔法值 = table.Column<int>(type: "integer", nullable: false),
                    冷却时间 = table.Column<int>(type: "integer", nullable: false),
                    效果ID列表 = table.Column<Guid[]>(type: "uuid[]", nullable: false),
                    战斗单位Id = table.Column<Guid>(type: "uuid", nullable: true),
                    名称 = table.Column<string>(type: "text", nullable: false),
                    描述 = table.Column<string>(type: "text", nullable: false),
                    图标 = table.Column<string>(type: "text", nullable: false),
                    创建时间 = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    更新时间 = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    类型 = table.Column<int>(type: "integer", nullable: false),
                    等级要求 = table.Column<int>(type: "integer", nullable: false),
                    数量 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_生命值 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_魔法值 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_物理攻击 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_物理防御 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_火属性攻击 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_水属性攻击 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_风属性攻击 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_土属性攻击 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_火属性抗性 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_水属性抗性 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_风属性抗性 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_土属性抗性 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_速度 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_幸运值 = table.Column<int>(type: "integer", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_技能配置表", x => x.Id);
                    table.ForeignKey(
                        name: "FK_技能配置表_战斗单位_战斗单位Id",
                        column: x => x.战斗单位Id,
                        principalTable: "战斗单位",
                        principalColumn: "Id");
                });

            migrationBuilder.CreateTable(
                name: "玩家角色表",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    角色名 = table.Column<string>(type: "text", nullable: false),
                    等级 = table.Column<int>(type: "integer", nullable: false),
                    职业 = table.Column<string>(type: "text", nullable: false),
                    创建时间 = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    用户Id = table.Column<Guid>(type: "uuid", nullable: false),
                    游戏玩家Id = table.Column<Guid>(type: "uuid", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_玩家角色表", x => x.Id);
                    table.ForeignKey(
                        name: "FK_玩家角色表_战斗单位_游戏玩家Id",
                        column: x => x.游戏玩家Id,
                        principalTable: "战斗单位",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_玩家角色表_用户表_用户Id",
                        column: x => x.用户Id,
                        principalTable: "用户表",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "游戏元素表",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    类型 = table.Column<int>(type: "integer", nullable: false),
                    等级要求 = table.Column<int>(type: "integer", nullable: false),
                    数量 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_生命值 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_魔法值 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_物理攻击 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_物理防御 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_火属性攻击 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_水属性攻击 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_风属性攻击 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_土属性攻击 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_火属性抗性 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_水属性抗性 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_风属性抗性 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_土属性抗性 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_速度 = table.Column<int>(type: "integer", nullable: false),
                    基础属性_幸运值 = table.Column<int>(type: "integer", nullable: false),
                    效果ID列表 = table.Column<Guid[]>(type: "uuid[]", nullable: false),
                    可装备 = table.Column<bool>(type: "boolean", nullable: false),
                    可使用 = table.Column<bool>(type: "boolean", nullable: false),
                    装备槽位 = table.Column<int>(type: "integer", nullable: true),
                    最大堆叠数 = table.Column<int>(type: "integer", nullable: false),
                    冷却时间 = table.Column<int>(type: "integer", nullable: false),
                    消耗魔法值 = table.Column<int>(type: "integer", nullable: false),
                    目标类型 = table.Column<int>(type: "integer", nullable: false),
                    元素类型 = table.Column<int>(type: "integer", nullable: false),
                    玩家Id = table.Column<Guid>(type: "uuid", nullable: true),
                    玩家Id1 = table.Column<Guid>(type: "uuid", nullable: true),
                    玩家Id2 = table.Column<Guid>(type: "uuid", nullable: true),
                    玩家Id3 = table.Column<Guid>(type: "uuid", nullable: true),
                    名称 = table.Column<string>(type: "text", nullable: false),
                    描述 = table.Column<string>(type: "text", nullable: false),
                    图标 = table.Column<string>(type: "text", nullable: false),
                    创建时间 = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    更新时间 = table.Column<DateTime>(type: "timestamp without time zone", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_游戏元素表", x => x.Id);
                    table.ForeignKey(
                        name: "FK_游戏元素表_战斗单位_玩家Id",
                        column: x => x.玩家Id,
                        principalTable: "战斗单位",
                        principalColumn: "Id");
                    table.ForeignKey(
                        name: "FK_游戏元素表_战斗单位_玩家Id1",
                        column: x => x.玩家Id1,
                        principalTable: "战斗单位",
                        principalColumn: "Id");
                    table.ForeignKey(
                        name: "FK_游戏元素表_战斗单位_玩家Id2",
                        column: x => x.玩家Id2,
                        principalTable: "战斗单位",
                        principalColumn: "Id");
                    table.ForeignKey(
                        name: "FK_游戏元素表_战斗单位_玩家Id3",
                        column: x => x.玩家Id3,
                        principalTable: "战斗单位",
                        principalColumn: "Id");
                });

            migrationBuilder.CreateTable(
                name: "怪物生成配置",
                columns: table => new
                {
                    怪物ID = table.Column<Guid>(type: "uuid", nullable: false),
                    数量 = table.Column<int>(type: "integer", nullable: false),
                    生成位置 = table.Column<int>(type: "integer", nullable: false),
                    怪物详情Id = table.Column<Guid>(type: "uuid", nullable: false),
                    事件节点Id = table.Column<Guid>(type: "uuid", nullable: true),
                    副本配置Id = table.Column<Guid>(type: "uuid", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_怪物生成配置", x => x.怪物ID);
                    table.ForeignKey(
                        name: "FK_怪物生成配置_事件节点_事件节点Id",
                        column: x => x.事件节点Id,
                        principalTable: "事件节点",
                        principalColumn: "Id");
                    table.ForeignKey(
                        name: "FK_怪物生成配置_副本配置表_副本配置Id",
                        column: x => x.副本配置Id,
                        principalTable: "副本配置表",
                        principalColumn: "Id");
                    table.ForeignKey(
                        name: "FK_怪物生成配置_战斗单位_怪物详情Id",
                        column: x => x.怪物详情Id,
                        principalTable: "战斗单位",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "掉落物品",
                columns: table => new
                {
                    物品ID = table.Column<Guid>(type: "uuid", nullable: false),
                    掉落概率 = table.Column<float>(type: "real", nullable: false),
                    最小数量 = table.Column<int>(type: "integer", nullable: false),
                    最大数量 = table.Column<int>(type: "integer", nullable: false),
                    事件节点Id = table.Column<Guid>(type: "uuid", nullable: true),
                    副本配置Id = table.Column<Guid>(type: "uuid", nullable: true),
                    怪物Id = table.Column<Guid>(type: "uuid", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_掉落物品", x => x.物品ID);
                    table.ForeignKey(
                        name: "FK_掉落物品_事件节点_事件节点Id",
                        column: x => x.事件节点Id,
                        principalTable: "事件节点",
                        principalColumn: "Id");
                    table.ForeignKey(
                        name: "FK_掉落物品_副本配置表_副本配置Id",
                        column: x => x.副本配置Id,
                        principalTable: "副本配置表",
                        principalColumn: "Id");
                    table.ForeignKey(
                        name: "FK_掉落物品_战斗单位_怪物Id",
                        column: x => x.怪物Id,
                        principalTable: "战斗单位",
                        principalColumn: "Id");
                    table.ForeignKey(
                        name: "FK_掉落物品_游戏元素表_物品ID",
                        column: x => x.物品ID,
                        principalTable: "游戏元素表",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "技能效果表",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    效果名称 = table.Column<string>(type: "text", nullable: false),
                    效果描述 = table.Column<string>(type: "text", nullable: false),
                    触发时机 = table.Column<int>(type: "integer", nullable: false),
                    触发概率 = table.Column<float>(type: "real", nullable: false),
                    持续回合数 = table.Column<int>(type: "integer", nullable: false),
                    参数 = table.Column<string>(type: "text", nullable: false),
                    技能配置Id = table.Column<Guid>(type: "uuid", nullable: true),
                    效果类型 = table.Column<string>(type: "character varying(8)", maxLength: 8, nullable: false),
                    游戏元素Id = table.Column<Guid>(type: "uuid", nullable: true),
                    增益属性_生命值 = table.Column<int>(type: "integer", nullable: true),
                    增益属性_魔法值 = table.Column<int>(type: "integer", nullable: true),
                    增益属性_物理攻击 = table.Column<int>(type: "integer", nullable: true),
                    增益属性_物理防御 = table.Column<int>(type: "integer", nullable: true),
                    增益属性_火属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    增益属性_水属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    增益属性_风属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    增益属性_土属性攻击 = table.Column<int>(type: "integer", nullable: true),
                    增益属性_火属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    增益属性_水属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    增益属性_风属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    增益属性_土属性抗性 = table.Column<int>(type: "integer", nullable: true),
                    增益属性_速度 = table.Column<int>(type: "integer", nullable: true),
                    增益属性_幸运值 = table.Column<int>(type: "integer", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_技能效果表", x => x.Id);
                    table.ForeignKey(
                        name: "FK_技能效果表_技能配置表_技能配置Id",
                        column: x => x.技能配置Id,
                        principalTable: "技能配置表",
                        principalColumn: "Id");
                    table.ForeignKey(
                        name: "FK_技能效果表_游戏元素表_游戏元素Id",
                        column: x => x.游戏元素Id,
                        principalTable: "游戏元素表",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "持续效果表",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    效果名称 = table.Column<string>(type: "text", nullable: false),
                    基础效果Id = table.Column<Guid>(type: "uuid", nullable: false),
                    剩余回合数 = table.Column<int>(type: "integer", nullable: false),
                    当前层数 = table.Column<int>(type: "integer", nullable: false),
                    最大层数 = table.Column<int>(type: "integer", nullable: false),
                    施加者Id = table.Column<Guid>(type: "uuid", nullable: false),
                    目标Id = table.Column<Guid>(type: "uuid", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_持续效果表", x => x.Id);
                    table.ForeignKey(
                        name: "FK_持续效果表_战斗单位_施加者Id",
                        column: x => x.施加者Id,
                        principalTable: "战斗单位",
                        principalColumn: "Id");
                    table.ForeignKey(
                        name: "FK_持续效果表_战斗单位_目标Id",
                        column: x => x.目标Id,
                        principalTable: "战斗单位",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_持续效果表_技能效果表_基础效果Id",
                        column: x => x.基础效果Id,
                        principalTable: "技能效果表",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateIndex(
                name: "IX_持续效果表_基础效果Id",
                table: "持续效果表",
                column: "基础效果Id");

            migrationBuilder.CreateIndex(
                name: "IX_持续效果表_目标Id",
                table: "持续效果表",
                column: "目标Id");

            migrationBuilder.CreateIndex(
                name: "IX_持续效果表_施加者Id",
                table: "持续效果表",
                column: "施加者Id");

            migrationBuilder.CreateIndex(
                name: "IX_掉落物品_副本配置Id",
                table: "掉落物品",
                column: "副本配置Id");

            migrationBuilder.CreateIndex(
                name: "IX_掉落物品_怪物Id",
                table: "掉落物品",
                column: "怪物Id");

            migrationBuilder.CreateIndex(
                name: "IX_掉落物品_事件节点Id",
                table: "掉落物品",
                column: "事件节点Id");

            migrationBuilder.CreateIndex(
                name: "IX_怪物生成配置_副本配置Id",
                table: "怪物生成配置",
                column: "副本配置Id");

            migrationBuilder.CreateIndex(
                name: "IX_怪物生成配置_怪物详情Id",
                table: "怪物生成配置",
                column: "怪物详情Id");

            migrationBuilder.CreateIndex(
                name: "IX_怪物生成配置_事件节点Id",
                table: "怪物生成配置",
                column: "事件节点Id");

            migrationBuilder.CreateIndex(
                name: "IX_技能配置表_战斗单位Id",
                table: "技能配置表",
                column: "战斗单位Id");

            migrationBuilder.CreateIndex(
                name: "IX_技能效果表_技能配置Id",
                table: "技能效果表",
                column: "技能配置Id");

            migrationBuilder.CreateIndex(
                name: "IX_技能效果表_游戏元素Id",
                table: "技能效果表",
                column: "游戏元素Id");

            migrationBuilder.CreateIndex(
                name: "IX_事件节点_副本配置Id",
                table: "事件节点",
                column: "副本配置Id");

            migrationBuilder.CreateIndex(
                name: "IX_玩家角色表_用户Id",
                table: "玩家角色表",
                column: "用户Id");

            migrationBuilder.CreateIndex(
                name: "IX_玩家角色表_游戏玩家Id",
                table: "玩家角色表",
                column: "游戏玩家Id",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "IX_游戏元素表_玩家Id",
                table: "游戏元素表",
                column: "玩家Id");

            migrationBuilder.CreateIndex(
                name: "IX_游戏元素表_玩家Id1",
                table: "游戏元素表",
                column: "玩家Id1");

            migrationBuilder.CreateIndex(
                name: "IX_游戏元素表_玩家Id2",
                table: "游戏元素表",
                column: "玩家Id2");

            migrationBuilder.CreateIndex(
                name: "IX_游戏元素表_玩家Id3",
                table: "游戏元素表",
                column: "玩家Id3");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "持续效果表");

            migrationBuilder.DropTable(
                name: "掉落物品");

            migrationBuilder.DropTable(
                name: "怪物生成配置");

            migrationBuilder.DropTable(
                name: "玩家角色表");

            migrationBuilder.DropTable(
                name: "装备特效");

            migrationBuilder.DropTable(
                name: "技能效果表");

            migrationBuilder.DropTable(
                name: "事件节点");

            migrationBuilder.DropTable(
                name: "用户表");

            migrationBuilder.DropTable(
                name: "技能配置表");

            migrationBuilder.DropTable(
                name: "游戏元素表");

            migrationBuilder.DropTable(
                name: "副本配置表");

            migrationBuilder.DropTable(
                name: "战斗单位");
        }
    }
}
